using Extra.Data.Extra.Forms;
using Extra.ERP;
using System;
namespace Extra.Data.Extra.Class
{
	public class DbInfo
	{
		private static string _mCurrentVersion;
		private static string _mRequestVersion = "1.5.3.5";
		private static string _mDescription = "";
		public static string CurrentVersion
		{
			get
			{
				return DbInfo._mCurrentVersion;
			}
			set
			{
				DbInfo._mCurrentVersion = value;
			}
		}
		public static string RequestVersion
		{
			get
			{
				return DbInfo._mRequestVersion;
			}
			set
			{
				DbInfo._mRequestVersion = value;
			}
		}
		public static string Description
		{
			get
			{
				return DbInfo._mDescription;
			}
			set
			{
				DbInfo._mDescription = value;
			}
		}
		public static void CheckVersion()
		{
			SYS_INFO sYS_INFO = new SYS_INFO();
			if (sYS_INFO.Get() == "OK")
			{
				DbInfo._mCurrentVersion = sYS_INFO.Version;
				DbInfo._mDescription = sYS_INFO.Description;
				if (string.Compare(DbInfo._mRequestVersion, sYS_INFO.Version, true) > 0)
				{
					xfmUpdateDatabase xfmUpdateDatabase = new xfmUpdateDatabase(DbInfo._mRequestVersion);
					xfmUpdateDatabase.ShowDialog();
				}
			}
			if (sYS_INFO.Get() == "OK")
			{
				DbInfo._mCurrentVersion = sYS_INFO.Version;
				DbInfo._mDescription = sYS_INFO.Description;
			}
		}
	}
}
